#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>

int* findDisappearedNumbers(int* nums, int numsSize, int* returnSize)
{
    int i = 0;
    int* ret = NULL;
    *returnSize = 0;

    for (i = 0; i < numsSize; ++i)
    {
        nums[nums[i] - 1] = 0;
    }
    for (i = 0; i < numsSize; ++i)
    {
        if (nums[i])
        {
            (*returnSize)++;
            ret = (int*)realloc(ret, (*returnSize) * sizeof(int));
            ret[*returnSize - 1] = i + 1;
        }
    }

    return ret;
}

//int main()
//{
//    int nums[] = { 4,3,2,7,8,2,3,1 };
//    int size = 0;
//   
//    findDisappearedNumbers(nums, sizeof(nums)/sizeof(nums[0]), &size);
//
//    return 0;
//}

//#include <stdio.h>
//int main()
//{
//    ///int x = -1;
//    unsigned int y = 2;
//    float x = 8.1;
//    x = x % 3;
//    if (x > y)
//    {
//        printf("x is greater");
//    } 
//        else
//    {
//    printf("y is greater");
//    } 
//        return 0;
//}

#include <stdio.h>
#include<string.h>

void RevolveStr(char* left, char* right)
{
    while (left < right)
    {
        char temp = *left;
        *left = *right;
        *right = temp;
        ++left;
        --right;
    }
}

int main()
{
    char str[10000] = { 0 };

    int pos1 = 0;
    int pos2 = 0;
    char constr[10000] = { 0 };
    int conti = 0;
    while (str[pos1])
    {

        if (('a' <= str[pos1] && str[pos1] <= 'z') && ('A' <= str[pos1] && str[pos1] <= 'Z'))
        {
            constr[pos2++] = str[pos1++];
            conti = 1;
        }
        else if (conti)
        {
            constr[pos2++] = 32;
            conti = 0;
        }
        pos1++;
    }

    int length = strlen(constr);
    int left = 0;
    int right = length - 1;
    RevolveStr(constr + left, constr + right - 1);
    while (left < length)
    {
        right = left;
        while (32 != constr[right])
        {
            right++;
        }
        RevolveStr(constr + left, constr + right - 1);
        left = right + 1;
    }
    printf("%s", constr);
    return 0;
}